home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / tfdd.com / TFDD.DOC < prev    next >
Encoding:
Text File  |  1990-07-13  |  4.9 KB  |  100 lines

  1. This is the documentation file for an archive also holding Turbo Pascal 5.5
  2. source for four object-oriented units that illustrate and apply TFDD's --
  3. text file device drivers:
  4.         tfdd.pas, a generic TFDD class meant only for inheritance. but suitable
  5.                 for any TFDD;
  6.         kbdEdit.pas, a tfdd descendant that implements a decent line editor for
  7.                 Read's and Readln's (like the editor the TP IDE uses for option
  8.                 windows)
  9.         strWrite.pas, a second tfdd descendant that simply allows writes to go
  10.                 to a string instead of to any output; the string can then be
  11.                 retrieved later
  12.         writAttr.pas, a third tfdd descendant that allows display attributes to
  13.                 be specified right in the middle of a write.
  14.  
  15. The point of using text file device drivers to do this is that a TFDD is simply
  16. invoked as a file variable whithin any Read, Readln, Write or Writeln, so:
  17.         1) you can still use the special flexibility of these Pascal commands,
  18.                 which can't be reproduced in normal in procedures;
  19.         2) pre-existing code is extremely easy to convert;
  20.         3) for quick work, no new procedures have to be learned -- you simply
  21.                 add the proper unit to the Uses clause, and call the proper file
  22.                 var.
  23.  
  24. Notes:
  25.    Tfdd.pas makes use of the User Data field in a text record to pass the
  26. address of Self to the various driver functions. TFDD's are older than OO
  27. facilities in TP, so they do not directly allow for object implementation. But,
  28. simply by using User Data as it's intended to be used, they can integrate quite
  29. well with objects. Both KbdEdit and StrWrite use the Self pointer, and in
  30. KbdEdit the tfdd's work is actually done by a class method.
  31.    Each of the three descendant units automatically initializes one instance of
  32. the class it defines, as part of its unit initialization code. In the case
  33. KbdEdit and WritAttr, it's hard to imagine why you'd need more than one
  34. instance of the class. But for StrWrite you might. All you'd have to do is
  35. declare
  36.         VAR otherStr: strWriteC;
  37. then call
  38.         otherStr.init;
  39.    KbdEdit and WritAttr use TP's Crt unit. Take care to replace the mention, in
  40. the implementation Uses lists, with OpCrt or TpCrt if you use those.
  41.  
  42.  
  43. Copyright notice:
  44.    I claim copyright on this file and the four source files mentioned.
  45.    These units are not put into the public domain, so as to prevent the
  46. diffusion of half-modified versions. The source code may be distributed by any
  47. means in complete form and as is, including the present notice, or not at all.
  48. Modifications, etc. may be ADDED to the distributed code, as separate texts, of
  49. course.
  50.    As author and copyright owner I waive all legal rights on object or
  51. executable code compiled using part or all of these units. This is to avoid any
  52. administrative complication for users.
  53.    However, I request that any programmer using this source code for paid work
  54. or for sold programs send me a $5 contribution at:
  55.                 Philippe Ranger
  56.                 P. O. Box 48017
  57.                 5678 Park Avenue
  58.                 Montreal  QC  H2V 4S8
  59.                 Canada
  60.  
  61. Comments would be much appreciated. My CompuServe user ID is 71531,1350.
  62.  
  63.         Philippe Ranger
  64.         July 13, 1990
  65.  
  66.          ----------------end-of-author's-documentation---------------
  67.  
  68.                         Software Library Information:
  69.  
  70.                    This disk copy provided as a service of
  71.  
  72.                         The Public (Software) Library
  73.  
  74.          We are not the authors of this program, nor are we associated
  75.          with the author in any way other than as a distributor of the
  76.          program in accordance with the author's terms of distribution.
  77.  
  78.          Please direct shareware payments and specific questions about
  79.          this program to the author of the program, whose name appears
  80.          elsewhere in  this documentation. If you have trouble getting
  81.          in touch with the author,  we will do whatever we can to help
  82.          you with your questions. All programs have been tested and do
  83.          run.  To report problems,  please use the form that is in the
  84.          file PROBLEM.DOC on many of our disks or in other written for-
  85.          mat with screen printouts, if possible.  The P(s)L cannot de-
  86.          bug programs over the telephone.
  87.  
  88.          Disks in the P(s)L are updated monthly, so if you did not get
  89.          this disk  directly from the P(s)L,  you should be aware that
  90.          the files in this set may no  longer be the current versions.
  91.  
  92.          For a copy of the latest monthly software library newsletter
  93.          and a list of the 2,000+ disks in the library, call or write
  94.  
  95.                         The Public (Software) Library
  96.                               P.O.Box 35705
  97.                            Houston, TX 77235-5705
  98.                                (713) 524-6394
  99.  
  100.